<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>项目详情</title>
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=0.5, minimum-scale=0.5, maximum-scale=0.5, user-scalable=no,viewport-fit=cover">
		<meta name="format-detection" content="telephone=no">
		<meta name="renderer" content="webkit">
		<meta http-equiv="Cache-Control" content="no-siteapp" />
		<meta name="format-detection" content="telephone=yes"/>
		<link rel="stylesheet" href="../../css/common.css" />
		<link rel="stylesheet" href="../../css/project/detail.css" />
		<script type="text/javascript" src="../../js/common/plus_common.js"></script>
		<script type="application/javascript" src="../../js/common/static_common.js"></script>
	</head>
	<body>
		<span id="app" v-cloak>
			<header :title="mallname"></header>
			<div class="_div data-v-36f5a921 container">
				<div class="_ul data-v-36f5a921 tab" :style="{opacity:tab_opacity}">
					<div bindtap="handleProxy" class="_li data-v-36f5a921 tab-item" :eventid="'6-'+index" v-for="(item, index) in tab_arr" @click="toggleTab(1+index)">
						<div class="_div data-v-36f5a921 msg" :class="[type==item.type?'active':'']"> {{item.msg}} </div>
					</div>
				</div>
				<div bindscroll="handleProxy" bindscrolltolower="handleProxy" class="_scroll-div data-v-36f5a921" :eventid="13" :scrollIntodiv="target" :scrollY="true" style="height:100%;">
					<div class="_div data-v-36f5a921" id="banner">
						<div autoplay="true" class="_swiper data-v-36f5a921 swiper" duration="500" indicator-dots="" interval="2000">
							<div class="_swiper-item data-v-36f5a921" style="position: absolute; height: 750px; transition: transform .5s ease" v-bind:style="{width: '100%',transform: 'translate('+translate+'px, 0px) translateZ(0px) '}">
								<image class="_image data-v-36f5a921 slide-image" :style="{width:picWidth+'px'}" v-for="item in bannerImg" :src="imgUrl+item"/>
							</div>
						</div>
					</div>
					<div class="_div data-v-36f5a921 mall">
						<div class="_div data-v-36f5a921 booking_price"> 预约价 ¥
							<label class="_span data-v-36f5a921 booking_priceNum"> {{mallList.appPrice}} </label>
							<image alt bindtap="handleProxy" class="_img data-v-36f5a921 bookimg" :eventid="7" src="../../images/proj-detail/gantanhao@2x.png" @click="tips()"></image>
							<label class="_span data-v-36f5a921 booked_star">
								<label class="_span data-v-36f5a921 booked1_star">
									<!-- proj star -->
									<image alt class="_img data-v-36f5a921 little_star" :src="mallList.score>=1?'../../images/proj-detail/pingxing-liang@2x.png':'../../images/proj-detail/pingxing-hui@2x.png'"></image>
									<image alt class="_img data-v-36f5a921 little_star" :src="mallList.score>=2?'../../images/proj-detail/pingxing-liang@2x.png':'../../images/proj-detail/pingxing-hui@2x.png'"></image>
									<image alt class="_img data-v-36f5a921 little_star" :src="mallList.score>=3?'../../images/proj-detail/pingxing-liang@2x.png':'../../images/proj-detail/pingxing-hui@2x.png'"></image>
									<image alt class="_img data-v-36f5a921 little_star" :src="mallList.score>=4?'../../images/proj-detail/pingxing-liang@2x.png':'../../images/proj-detail/pingxing-hui@2x.png'"></image>
									<image alt class="_img data-v-36f5a921 little_star" :src="mallList.score>=5?'../../images/proj-detail/pingxing-liang@2x.png':'../../images/proj-detail/pingxing-hui@2x.png'"></image>
								</label> {{mallList.score}}分 </label>
						</div>
						<div class="_p data-v-36f5a921 pay_type"> 优惠价 ¥ {{mallList.disPrice}}
							<label class="_span data-v-36f5a921 booked1">
							<label class="_span data-v-36f5a921 booked">已预约   </label>{{mallList.orderCount==null?'0':mallList.orderCount}}人 </label>
						</div>
						<div class="_h5 data-v-36f5a921 mall_name">{{mallList.name}}</div>
						<div class="_p data-v-36f5a921 mall_dec"> {{mallList.remark}} </div>
					</div>
					<div class="_div data-v-36f5a921 hospital">
						<div class="_div data-v-36f5a921 hos">
							<image alt class="_img data-v-36f5a921 hospital_img" :src="array.logoPath ? imgUrl+'mini_'+array.logoPath : ''"></image>
						</div>
						<div class="_div data-v-36f5a921 hos_right">
							<div class="_p data-v-36f5a921 hos_name"> {{array.name}}
								<image alt class="_img data-v-36f5a921 extraLevel" src="../../images/proj-detail/yiyuanjibie@2x.png"></image>
							</div>
							<div class="_div data-v-36f5a921 address">
								<div class="_div data-v-36f5a921 address_left">
									<image class="_img data-v-36f5a921 locate" src="../../images/proj-detail/dingwei@2x.png"></image>
								</div>
								<div class="_div data-v-36f5a921 address_right">{{array.addr}}</div>
							</div>
							<div class="_ul data-v-36f5a921 hos_show">
								<div class="_li data-v-36f5a921 hos_show_item">项目：{{array.projectCount}}</div>
								<div class="_li data-v-36f5a921 hos_show_item doctor_num">医生：{{array.doctorCount}}</div>
							</div>
						</div>
					</div>
					<div class="_ul data-v-36f5a921 reference_project_ul">
						<div bindtap="handleProxy" class="_li data-v-36f5a921 reference_project_li" :eventid="'11-'+index" v-for="(item, index) in reference_project" @click="toProjectDetail(item)">
							<label class="_span data-v-36f5a921 reference_project">
								<image alt class="_img data-v-36f5a921 pro_img" :src="imgUrl+'mini_'+item.logoPath"></image>
							</label>
							<div class="_br data-v-36f5a921"></div>
							<label class="_span data-v-36f5a921 reference_project_name">{{item.name}}</label>
							<div class="_br data-v-36f5a921"></div>
							<div class="_p data-v-36f5a921 reference_project_price">优惠价
							<label class="_span data-v-36f5a921 appointment_price"> ¥{{item.disPrice}}</label> 起</div>
						</div>
					</div>
					
					<!-- eval segment -->
					<div class="_div data-v-36f5a921 evaluation" id="evaluation">
						<div bindtap="handleProxy" class="_p data-v-36f5a921 user_evaluation" :eventid="12">反馈 ({{evaluationNum}})
						<label class="_span data-v-36f5a921 check_evaluation"> 全部反馈
							<image class="_img data-v-36f5a921 evaluation_icon" src="../../images/proj-detail/xiayibu@2x.png"></image>
						</label>
						</div>
						<div class="_div data-v-36f5a921 evaluation_item" v-if="evaluationList.length!==0" v-for="(item, index) in evaluationList">
							<div class="_div data-v-36f5a921 hos user_info">
								<image alt class="_img data-v-36f5a921 user_img" :src="imgUrl+item.headimgurl"></image>
								<div class="_p data-v-36f5a921 user_name">{{item.nickName}}</div>
								<label class="_span data-v-36f5a921 evaluation_time">{{item.time}}</label>
								<label class="_span data-v-36f5a921 star">
									<label class="_span data-v-36f5a921 star_box">
										<image alt class="_img data-v-36f5a921 little_star" :src="item.score>=1?'../../images/proj-detail/pingxing-liang@2x.png':'../../images/proj-detail/pingxing-hui@2x.png'"></image>
										<image alt class="_img data-v-36f5a921 little_star" :src="item.score>=2?'../../images/proj-detail/pingxing-liang@2x.png':'../../images/proj-detail/pingxing-hui@2x.png'"></image>
										<image alt class="_img data-v-36f5a921 little_star" :src="item.score>=3?'../../images/proj-detail/pingxing-liang@2x.png':'../../images/proj-detail/pingxing-hui@2x.png'"></image>
										<image alt class="_img data-v-36f5a921 little_star" :src="item.score>=4?'../../images/proj-detail/pingxing-liang@2x.png':'../../images/proj-detail/pingxing-hui@2x.png'"></image>
										<image alt class="_img data-v-36f5a921 little_star" :src="item.score>=5?'../../images/proj-detail/pingxing-liang@2x.png':'../../images/proj-detail/pingxing-hui@2x.png'"></image>
									</label> {{item.score}}分 </label>
							</div>
							<div class="_p data-v-36f5a921 evaluation_content">{{item.content}}</div>
							<div class="_ul data-v-36f5a921 evaluationIMG" v-if="item.images.length>0">
								<div class="_li data-v-36f5a921 evaluationIMG_li" v-if="item!==''&&item!==null" v-for="(item,index) in item.images" >
									<image alt class="_img data-v-36f5a921 evaluationIMG_li_item" :src="imgUrl+'mini_'+item" v-if="item!==''"></image>
								</div>
								<label class="_span data-v-36f5a921 tip" v-if="imgArray.length>3&&index1==3">{{imgArray.length}}</label>
							</div>
							<div class="_p data-v-36f5a921 likeStyle">
								<image class="_img data-v-36f5a921 likeImg" :src="item.is_praise==false?'../../images/proj-detail/dianzan-1@2x.png':'../../images/proj-detail/dianzanhou@2x.png'"></image> {{item.goodCount}} </div>
						</div>
					</div>
					<div class="_div data-v-36f5a921 check_img" id="project_detail">上滑查看图文详情</div>
					<div class="_div data-v-36f5a921 imgsbox">
						<image alt class="_img data-v-36f5a921 imgs" mode="widthFix" :src="imgUrl+item" v-for="(item,index) in goods_data2" ></image>
					</div>
				</div>
				<div class="_div data-v-36f5a921 bottom">
					<div class="_div data-v-36f5a921 btn">
						<a class="_div data-v-36f5a921 tel" href="tel:4006886939">
						<div bindtap="handleProxy" class="_div data-v-36f5a921 tel" :eventid="14">
							<image alt class="_img data-v-36f5a921 tel_icon" src="../../images/proj-detail/dainhua@2x.png"></image> 电话 </div></a>
						<div class="_div data-v-36f5a921 consult" @click="gotoWaiter()">
							<image alt class="_img data-v-36f5a921 consult_icon" src="../../images/proj-detail/kefu@2x.png"></image> 咨询
							<button class="_button data-v-36f5a921 contact" openType="contact"></button>
						</div>
						<label bindtap="handleProxy" class="_span data-v-36f5a921 booking_btn" :eventid="15" >立即预约</label>
						<button @click="tobooking_detail()" bindgetuserinfo="handleProxy" class="_button data-v-36f5a921 userinfo-btn" :eventid="16" openType="getUserInfo" v-if="tokenMark"></button>
					</div>
				</div>
				<div class="_div data-v-36f5a921 btns clearfix" v-if="scrollTop<50">
					<div catchtap="handleProxy" class="_div data-v-36f5a921 collect" :eventid="17" @click="collect()">
						<image alt srcset class="_img data-v-36f5a921 image" mode="widthFix" :src="iscollect==true?'../../images/proj-detail/shoucanghou@2x.png':'../../images/proj-detail/shoucang--huidi@2x.png'"></image>
					</div>
					<button class="_button data-v-36f5a921 share" openType="share" onclick="shareWeb()"></button>
				</div>
			</div>
		</span>
	</body>
	<script type="application/javascript" src="../../js/project/detail.js"></script>
	
	<script>
		var shares = null;
		var sweixin = null;
		var buttons = [{
				title: '我的好友',
				extra: {
					scene: 'WXSceneSession'
				}
			},
			{
				title: '朋友圈',
				extra: {
					scene: 'WXSceneTimeline'
				}
			}
		];
		// H5 plus事件处理
		function plusReady() {
			updateSerivces();
		}
		if (window.plus) {
			plusReady();
		} else {
			document.addEventListener('plusready', plusReady, false);
		}
		/**
		 * 更新分享服务
		 */
		function updateSerivces() {
			plus.share.getServices(function(s) {
				shares = {};
				for (var i in s) {
					var t = s[i];
					shares[t.id] = t;
				}
				sweixin = shares['weixin'];
			}, function(e) {
				outSet('获取分享服务列表失败：' + e.message);
			});
		}
	
		// 分享网页
		function shareWeb() {
			login._2page();
			var msg = {
				type: 'web',
				thumbs: [imgUrl+vue.bannerImg[0]]
			};
			var userData = localStorage.getItem("user_data");
			var userId = "";
			if(userData){
				userId = userData.userId;
			}
			msg.href = "https://mjz.yitavc.com:88/mjzapp/html/mine/share_get.html?shareUserId="+userId;
			msg.title = "新用户首单免费领取5万元补贴";
			content = vue.mallList.name+"\n"+vue.mallList.remark+"\n"
			msg.content = content;
			sweixin ? plus.nativeUI.actionSheet({
				title: '分享网页到微信',
				cancel: '取消',
				buttons: buttons
			}, function(e) {
				(e.index > 0) && share(sweixin, msg, buttons[e.index - 1]);
			}) : $(document).dialog({
				type:'confirm',
				titleText:"分享商品",
				position:'center',
				content:"亲！请使用app或者小程序分享唷！立即下载app？",
				buttonTextConfirm:"想要",
				buttonTextCancel:"算了",
				onClickConfirmBtn:function(){
					window.location.href="https://app.meijiangzi.com/static/mjzapp.html";
				},
			});
		}
	
		// 分享
		function share(srv, msg, button) {
			console.log('分享操作：');
			if (!srv) {
				outLine('无效的分享服务！');
				return;
			}
			button && (msg.extra = button.extra);
			// 发送分享
			if (srv.authenticated) {
				console.log('---已授权---');
				doShare(srv, msg);
			} else {
				console.log('---未授权---');
				srv.authorize(function() {
					doShare(srv, msg);
				}, function(e) {
					console.log('认证授权失败：' + JSON.stringify(e));
				});
			}
		}
		// 发送分享
		function doShare(srv, msg) {
			console.log(JSON.stringify(msg));
			srv.send(msg, function() {
				console.log('分享到"' + srv.description + '"成功！');
			}, function(e) {
				console.log('分享到"' + srv.description + '"失败: ' + JSON.stringify(e));
			});
		}
		// 解除授权
		function cancelAuth() {
			console.log('解除授权：');
			if (sweixin) {
				if (sweixin.authenticated) {
					console.log('取消"' + sweixin.description + '"');
				}
				sweixin.forbid();
			} else {
				console.log('当前环境不支持微信分享操作!');
			}
		}
	</script>
</html>
